home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / ov_all.zip / TI742.ASC < prev    next >
Text File  |  1992-01-28  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  ObjectVision                           NUMBER  :  742
  9.   VERSION  :  2.0
  10.        OS  :  WIN
  11.      DATE  :  January 28, 1992                           PAGE : 1/2
  12.  
  13.     TITLE  :  Using DLL's with ObjectVision
  14.  
  15.  
  16.  
  17.  
  18.  
  19.   Q. Where do I get additional information about creating DLL's to
  20.      work with OV?
  21.   A. Your most valuable information will come from the CHOICE.C,
  22.      OVLOOPS.C, RAND.PAS, and TSTCOM.PAS example files in the
  23.      sample directory.  These will show you the syntax for
  24.      declaring your functions in the DLL, as well as some of the
  25.      more common "how-to"'s such as self-registering the functions
  26.      (OVLOOPS.C) in the DLL, getting/putting information in an OV
  27.      field, and executing OV functions from within your DLL.  More
  28.      importantly, these examples will give you a feel for how to
  29.      work with OV from within your DLL.
  30.  
  31.   Q. The documentation lists the callback functions you pass as
  32.      argument types to your DLL, but it does not explain the
  33.      parameters for them.  Where is this information?
  34.   A. You can find the descriptions of the functions as well as
  35.      their  prototypes in the file CHOICE.H in your sample
  36.      directory.
  37.  
  38.   Q. How do I change an OV field from within my DLL?
  39.   A. You can manipulate fields from within your DLL in different
  40.      ways.  The GET and PUT callback functions allow direct access
  41.      to fields and both take the field name (as a character string)
  42.      as a parameter.  Another way is to use the EXECUTESTRING
  43.      function (CHOICE.H) to execute an OV command such as @ASSIGN.
  44.      This method, while being less efficient than using GET or PUT,
  45.      opens the door to any of the functionality of ObjectVision to
  46.      your DLL.  A third method is to pass the field as a parameter
  47.      to your function and pass the updated value back as a return
  48.      type.  This method would look something like this
  49.      "@ASSIGN(Field1, @MYFUNC(Field1))" in your OV form. Examples
  50.      of these methods can be found in the OVLOOPS.C.
  51.  
  52.   Q. What are the hMainWindow (y) and hInst (z) argument types?
  53.   A. These are the HWND and instance HANDLE of the ObjectVision's
  54.      main window.  This allows you to call Windows API functions
  55.      that need an HWND or an INSTANCE from within your DLL
  56.      function.  Use these with care!
  57.  
  58.   Q. OVLOOPS.DLL uses a function called EXECUTESTRING, but I don't
  59.      see this in the list of argument types in the manual.  What is
  60.      this function?
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  ObjectVision                           NUMBER  :  742
  75.   VERSION  :  2.0
  76.        OS  :  WIN
  77.      DATE  :  January 28, 1992                           PAGE : 2/2
  78.  
  79.     TITLE  :  Using DLL's with ObjectVision
  80.  
  81.  
  82.  
  83.  
  84.   A. This is a function which was added to ObjectVision after the
  85.      documentation went to the printer.  Its purpose is to allow
  86.      you to execute OV functions from within your DLL, thus opening
  87.      up all the power of OV to your DLL.  You can find it
  88.      documented in the file CHOICE.H in your sample directory.
  89.  
  90.   Q. What is the difference between the C string (C) argument type
  91.      and the C string buffer (F) argument type?
  92.   A. The only difference is that the buffer type (F) will point to
  93.      a 4K buffer which OV has allocated for you to use within your
  94.      function.  The memory will be deallocated upon return from
  95.      your function.  The buffer is not stored permanently in OV, so
  96.      if you want the data in the buffer to be stored in an OV field
  97.      you should use the PUT callback function.  This reduces your
  98.      responsibility of allocating and deallocating memory within
  99.      your DLL, making it simpler to write.
  100.  
  101.   Q. How do I debug my DLL with TDW?
  102.   A. Debugging your DLL for ObjectVision is no different than
  103.      debugging any DLL under Windows, just remember that
  104.      ObjectVision is the application that loads the DLL, so it is
  105.      the file you will load under the debugger.  For information on
  106.      debugging DLL's refer to the TDW section of your Turbo
  107.      Debugger manual.  A shortcut to getting a breakpoint in your
  108.      DLL is to generate an interrupt 3 ('geninterrupt(3);' if your
  109.      using C or 'inline($cc);' if you are using PASCAL) in your
  110.      function where you want the breakpoint.  This saves you the
  111.      trouble of loading the DLL in TDW first to set a breakpoint.
  112.  
  113.   Q. Can I use OWL to create my DLL?
  114.   A. Yes, you can, but the entry points to your DLL ( i.e. the
  115.      functions you register with @REGISTER ) must be C functions.
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.